import { baseRequest } from '@/utils/request'

const request = (url, ...arg) => baseRequest(`/ams/commodityinfo/` + url, ...arg)

/**
 * ams_commodity_infoApi接口管理器
 *
 * @author 刘志刚
 * @date  2024/12/27 13:41
 **/
export default {
	// 获取ams_commodity_info分页
	amsCommodityInfoPage(data) {
		return request('page', data, 'get')
	},
	// 提交ams_commodity_info表单 edit为true时为编辑，默认为新增
	amsCommodityInfoSubmitForm(data, edit = false) {
		return request(edit ? 'edit' : 'add', data)
	},
	// 删除ams_commodity_info
	amsCommodityInfoDelete(data) {
		return request('delete', data)
	},
	// 获取ams_commodity_info详情
	amsCommodityInfoDetail(data) {
		return request('detail', data, 'get')
	},
	amsCommodityList() {
		return request('list', '', 'get')
	}
}
